<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.dao.CommonDAO"%>
<%@page import="com.util.Info"%>
<%@page import="com.model.Sysuser"%>
<%@page import="com.model.Tjreport"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>用户注册</title>
<!-- 调用CSS，JS -->
<link href="/wearablehealthymonitorsys/admin/images/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-family: "宋体";
	font-size: 12px;
	color: #333333;
	background-color: ;
}
.STYLE1 {
	color: #333333;
	font-size: x-large;
	font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
<script language="javascript">
function window.onload() { 

if(top.location != self.location){ 

var a = window.parent.document.getElementsByTagName('iframe'); 

for (var i=0; i<a.length; i++){ 

if (a[i].name == self.name) {a[i].height = document.body.scrollHeight+320; return;}}} 
} 
</script>
<script language=javascript>
function show(no)
{
for(var i=1;i<20;i++)
{
var a = document.getElementById(no+"@"+i);
if(a==null)
{
continue;
}
if(a.style.display=="")
{
a.style.display="none";
}else{
a.style.display="";
}
}

}
</script>
<script type="text/javascript">
function showzhi(inn)
{
var a = document.getElementById("loca");
a.innerHTML=inn;
}
function change(no)
{
var c = document.getElementById("c");
c.innerHTML=no;
}
</script>

</head>
<body>
<%
  CommonDAO dao = (CommonDAO)Info.getDao(request,"CommonDAO");
  String id = request.getParameter("id");
  String cyid = request.getParameter("cyid");
  if(id==null)id = (String)request.getAttribute("id");
  Tjreport tjreport = (Tjreport)dao.findById(id,"Tjreport");
   %>
					<form  name="f1" method="post" action="TjrecordEdit.action?id=<%=id %>" onsubmit="return ck()">
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBD3EB">
							<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">年龄</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="age" name="age" value="<%=tjreport.getAge() %>"/></td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">身高</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="sg" name="sg" value="<%=tjreport.getSg() %>" onkeyup='checkDecimal(this)'/>cm</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">体重</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="tz" name="tz" value="<%=tjreport.getTz() %>" onkeyup='checkDecimal(this)'/>kg</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">视力</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="sl" name="sl" value="<%=tjreport.getSl() %>" onkeyup='checkDecimal(this)'/></td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">听力</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="tl" name="tl" value="<%=tjreport.getTl() %>" /></td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">血压</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="xy" name="xy"  value="<%=tjreport.getXy() %>"/></td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">呼吸系统是否正常</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;
                            		<select id="hxnote" name="hxnote">
                            			<option value="是" <%if(tjreport.getHxnote().equals("是")){out.print("selected==selected");} %>>是</option>
                            			<option value="否" <%if(tjreport.getHxnote().equals("否")){out.print("selected==selected");} %>>否</option>
                            		</select>
                            	</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">有无先天异常病</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;
                            		<select id="ycbnote" name="ycbnote">
                            			<option value="是" <%if(tjreport.getYcbnote().equals("是")){out.print("selected==selected");} %>>是</option>
                            			<option value="否" <%if(tjreport.getYcbnote().equals("是")){out.print("selected==selected");} %>>否</option>
                            		</select>
                            	</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">消化系统是否正常</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;
                            		<select id="xhxtnote" name="xhxtnote">
                            			<option value="是" <%if(tjreport.getXhxtnote().equals("是")){out.print("selected==selected");} %>>是</option>
                            			<option value="否" <%if(tjreport.getXhxtnote().equals("是")){out.print("selected==selected");} %>>否</option>
                            		</select>
                            	</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">是否贫血</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;
                            		<select id="ispx" name="ispx">
                            			<option value="是" <%if(tjreport.getIspx().equals("是")){out.print("selected==selected");} %>>是</option>
                            			<option value="否" <%if(tjreport.getIspx().equals("是")){out.print("selected==selected");} %>>否</option>
                            		</select>
                            	</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">其他</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<textarea rows="3" cols="50" id="othernote" name="othernote"><%=tjreport.getOthernote() %></textarea></td>
    						</tr>
    						
    						
    						<tr>
    							<td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF"></td>
    							<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="submit" value="提交"/><input type="reset" value="重置"/></td>
    						</tr>
                            <script language="javascript">
                            var record={ 
                            		num:"" 
                            		} 
                            		var checkDecimal=function(n){ 
                            		var decimalReg=/^\d{0,8}\.{0,1}(\d{1,2})?$/;//var decimalReg=/^[-\+]?\d{0,8}\.{0,1}(\d{1,2})?$/; 
                            		if(n.value!=""&&decimalReg.test(n.value)){ 
                            		record.num=n.value; 
                            		}else{ 
                            		if(n.value!=""){ 
                            		n.value=record.num; 
                            		} 
                            		} 
                            		} 
                    		
                            function ck(){
                            	if(f1.age.value==""){
                            		alert("年龄不能为空");
                            		return false;
                            	}if(f1.sg.value==""){
                            		alert("身高不能为空");
                            		return false;
                            	}if(f1.tz.value==""){
                            		alert("体重不能为空");
                            		return false;
                            	}if(f1.sl.value==""){
                            		alert("视力不能为空");
                            		return false;
                            	}if(f1.tl.value==""){
                            		alert("听力不能为空");
                            		return false;
                            	}if(f1.xy.value==""){
                            		alert("血压不能为空");
                            		return false;
                            	}
                            }

<%
String no = (String)request.getAttribute("no");
String suc = (String)request.getAttribute("suc");
if(no!=null)
{
 %>
 alert("");

 <%}
if(suc!=null)
{
 %>
 alert("操作成功");
location.replace("/wearablehealthymonitorsys/admin/familycygl.jsp");
 <%}%>
                            </script>
</table>      
</form>                 
</body>
</html>
